//
//  ViewController.m
//  03-新建图层
//
//  Created by J on 16/2/23.
//  Copyright © 2016年 J. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    //创建图层
    CALayer * layer= [CALayer layer];
    
    layer.frame = CGRectMake(50, 50, 200, 200);
    layer.backgroundColor = [UIColor orangeColor].CGColor;
    layer.contents = (__bridge id _Nullable)([UIImage imageNamed:@"阿狸头像"].CGImage);
    
    [self.view.layer addSublayer:layer];

    
        

}



@end
